//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { VueEditorItemsConfig, VueEditorItemsConfigResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooVueEditorItemsConfigList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<VueEditorItemsConfigResponse>(`/uctoo/vue_editor_items_config/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooVueEditorItemsConfig = async (id: string) => {
  return requestClient.get<VueEditorItemsConfig>(`/uctoo/vue_editor_items_config/${id}`);
};

export const adductooVueEditorItemsConfig = async (data: Partial<VueEditorItemsConfig>) => {
  return requestClient.post<VueEditorItemsConfig>('/uctoo/vue_editor_items_config/add', data);
};

export const edituctooVueEditorItemsConfig = async (data: Partial<VueEditorItemsConfig>) => {
  return requestClient.post<VueEditorItemsConfig>('/uctoo/vue_editor_items_config/edit', data);
};

export const deleteuctooVueEditorItemsConfig = async (id: string) => {
  return requestClient.post<any>('/uctoo/vue_editor_items_config/del', { id });
};
